{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">粉丝列表</li>
        </ul>
        <div class="layui-tab-content">

            <form class="layui-form layui-form-pane" action="{:url('admin/fans/allfans')}" method="get">
                <div class="layui-inline">
                    <label class="layui-form-label">粉丝昵称</label>

                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">关键词</label>
                    <div class="layui-input-inline">
                        <input type="text" name="keyword" value="{$keyword}" placeholder="请输入关键词" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn">搜索</button>
                </div>
            </form>
            <hr>

            <form action="" method="post" class="ajax-form">
                <div class="layui-tab-item layui-show">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th>粉丝头像</th>
                            <th >昵称</th>
                            <th>性别</th>
                            <th>对接客服</th>
                            <th>关注</th>
                            <th>关注时间</th>
                            <th>取关时间</th>
                            <th>发送数量</th>
                            <th>回复数量</th>
                            <th>openid</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name="allfans" item="vo"}
                        <tr>
                            <td><img src="{$vo.headimgurl}" style="width: 30px;height: auto;"></td>
                            <td>{$vo.nickname}</td>
                            <td>{$vo.sex}</td>
                            <td>{$vo.cs_nickname}</td>
                            <td>{$vo.subscribe}</td>
                            <td>{$vo.subscribe_time}</td>
                            <td>{$vo.unsubscribe_time}</td>
                            <td>{$vo.chat_count[1001] ?? 0}</td>
                            <td>{$vo.chat_count[1002] ?? 0}</td>
                            <td>{$vo.openid}</td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                    <!--分页-->
                    {$allfans->render()}
                </div>
            </form>
        </div>
    </div>
</div>
{/block}